const Promise = require('./promisetrue.js')
console.log('1')
new Promise((resolve,reject)=>{
    console.log("开始啦")
    console.log('2')
    setTimeout(()=>{
        resolve(1)
    })
    //resolve(1)
}).then(function(value){
    console.log('4')
    // console.log(value+'value')
    //return 'hehe'+value
    return new Promise(resolve=>{
        resolve('1')
    },reject=>{
        reject('eror')
    })
},function(reason){
    console.log(reason)
})
.then(function(value){
    console.log('4')
    console.log(value+'value')
},function(reason){
    console.log(reason)
})

console.log('3')